﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TS.Bussiness;
using TS.Commons;
using TS.Entities;

namespace Tranco.Shares
{
    public partial class Customer : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ConfigurationBussiness cbu = new ConfigurationBussiness();

            if (Session["TracoGroupId"].ToNumeric() != 1)
            {
                var config = cbu.GetConfig();
                if (config.IsClosed == 1)
                    Response.Redirect("~/Maintenance.aspx");
            }

            if (!IsPostBack)
            {
                cbu.UpdateViewCount();
            }
        }
    }
}